package com.zfl.service.impl;

import java.util.List;
import java.util.Set;


import com.zfl.util.RedisUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zfl.mapper.MajorServiceMapper;
import com.zfl.po.Major;
import com.zfl.service.MajorService;

@Service
public class MajorServiceImpl implements MajorService{

    @Autowired
    private MajorServiceMapper majorServiceMapper;
    @Autowired
    private RedisUtil redisUtil;
    
    @Override
    public List<Major> getAllMajors() {
        // TODO Auto-generated method stub
        Object majors = majorServiceMapper.getAllMajors();

        this.redisUtil.setList("major",(List<Object>)majors);
        return (List<Major>) majors;

    }

    
}
